Skip to content

Include on-chain payments in list payments API#219

Closed
benthecarman wants to merge 1 commit into
lightningdevkit:mainfrom
benthecarman:fix-onchain-payments
Closed

Include on-chain payments in list payments API#219
benthecarman wants to merge 1 commit into
lightningdevkit:mainfrom
benthecarman:fix-onchain-payments

Conversation

@benthecarman
Copy link
Copy Markdown
Collaborator

@benthecarman benthecarman commented May 22, 2026

ListPayments only read from ldk-server's paginated payment store, which is populated from Lightning payment events. On-chain payments are stored by LDK Node directly, so they never appeared in paginated list responses.

Backfill on-chain payments from LDK Node before reading the existing paginated store. This keeps list payments complete until LDK Node owns paginated listing for both Lightning and on-chain payments. Eventually we can remove this when we use the paginated KV store all throughout ldk-node.

Add an e2e test covering an on-chain send appearing in list payments.

@benthecarman benthecarman requested a review from tnull May 22, 2026 21:24
@ldk-reviews-bot
Copy link
Copy Markdown

ldk-reviews-bot commented May 22, 2026

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

Comment thread ldk-server/src/api/list_payments.rs Outdated
Copy link
Copy Markdown
Collaborator

@tnull tnull left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I'm confused why we need this, isn't the plan to enable pagination on LDK Node's payment store and to drop the separate paginated store in Server entirely?

@benthecarman
Copy link
Copy Markdown
Collaborator Author

Hmm, I'm confused why we need this, isn't the plan to enable pagination on LDK Node's payment store and to drop the separate paginated store in Server entirely?

Yeah this is a temporary fix

Eventually we can remove this when we use the paginated KV store all throughout ldk-node.

ListPayments only read from ldk-server's paginated payment store, which
is populated from Lightning payment events. On-chain payments are stored
by LDK Node directly, so they never appeared in paginated list responses.

Backfill on-chain payments from LDK Node before reading the existing
paginated store. This keeps list payments complete until LDK Node owns
paginated listing for both Lightning and on-chain payments.

Add an e2e test covering an on-chain send appearing in list payments.
@benthecarman benthecarman force-pushed the fix-onchain-payments branch from 4889d15 to 14ea435 Compare May 29, 2026 09:30
@benthecarman
Copy link
Copy Markdown
Collaborator Author

just gonna leave the bug until fixed it in ldk-node (will be fixed before we release)

@benthecarman benthecarman deleted the fix-onchain-payments branch May 29, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants